<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        <script src="js/time.js?">
        </script>
        <script>
        
        </script>
    </head>
    <body >
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <?php //print_r($xishu); ?>
        
        <form action="" method="POST" id="rowForm">
		  <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
		    <tr>
		<td><?= translate('ACTIVITY_MODULE_DES') ?>:</td>
		<td><?=$modulename ?></td>
	</tr>

	<tr>
		<td><?= translate('ACTIVITY_STRATEGY_STRAGEGYNAME') ?></td>
		<td><input type="text" name="row[strategyname]" id="strategyname"
			value="<?= $row['strategyname'] ?>"></td>
	</tr>
		      <tr>
		        <td>
		            <?= translate('ACTIVITY_WISHWELL_DIAMONDFT') ?>
		          </td>
		        <td >
		            <input type="text"  name="row[diamondft]" id="diamondft" value = '<?=$row['diamondft'] ?>' />
		        </td>
		      </tr>
		      <tr>
		        <td>
		            <?= translate('ACTIVITY_WISHWELL_GOLDFT') ?>
		         </td>
		        <td >
		            <input type="text" name="row[goldft]" id="goldft" value="<?= $row['goldft'] ?>">
		        </td>
		      </tr>
		      <tr>
		        <td>
		            <?= translate('ACTIVITY_WISHWELL_WISHNUMFT') ?>
		         </td>
		        <td >
		            <input type="text" name="row[wishnumft]" id="wishnumft" value="<?= $row['wishnumft'] ?>">
		        </td>
		      </tr>
		    
		      <input name="tablename" type='hidden' value="<?=$tablename ?>" />
			<input name="strategyid" type='hidden' value="<?=$row['strategyid'] ?>" />
			<input name="tableenum" type='hidden' value="<?=$tableenum ?>" />
			<tr>
				<td>
				<div align="center"><input type="hidden" name="tablename"
					value="<?= $tablename ?>"> <input name="submit" type="submit"
					id="submit" value="<?= translate('SUBMIT') ?>" /></div>
				</td>
				<td>
				<div align="center"><input type="reset"
					value="<?= translate('RESET') ?>" id="reset" /></div>
				</td>
			</tr>
		   
		  </table>
	</form>

    <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                for(var count =0; count < <?=count($xishu) ?>; ++count)
                {
                    $("#strategyname"+count).formValidator({empty: false, onshow: '<?= translate('C_NOT_EMPTY') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                	$("#strategyid"+count).formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                	$("#diamondft"+count).formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: "^(0\.\d)|(1)$", onerror: '<?= translate('C_NUM_BETTWEEN_0_AND_1') ?>'}); 
                	$("#goldft"+count).formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: '(^0$)|(^[1-9]\d*$)',  onerror: '<?= translate('C_NUM_BIGTHEN_1') ?>'});
                	$("#wishnumft"+count).formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: '(^0$)|(^[1-9]\d*$)',  onerror: '<?= translate('C_NUM_BIGTHEN_1') ?>'});
                    
                }
               });
    </script>
    </body>
</html>